<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="catalog" tagdir="/WEB-INF/tags/catalog"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="customer" tagdir="/WEB-INF/tags/customer"%>

<form id="addReviewForm" action="<customer:productReviewUrl product="${product}"/>" onsubmit="addReview();return false;" method="post">
	<div class="reply_form">
		<div class="top">
			<fmt:message key="productReviewList.reviewMsg"/>“${product.productName}”
		</div>
		<div class="content">
			<ins></ins>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
							<th width="40"><fmt:message key="productReviewForm.rate"/>：</th>
							<td width="576">
								<div style="display: inline-block;">
									 <input class="hover-star" type="radio" name="rate" value="1" title="<fmt:message key="productReview.rate.1"/>"/>
								     <input class="hover-star" type="radio" name="rate" value="2" title="<fmt:message key="productReview.rate.2"/>"/>
								     <input class="hover-star" type="radio" name="rate" value="3" title="<fmt:message key="productReview.rate.3"/>"/>
								     <input class="hover-star" type="radio" name="rate" value="4" title="<fmt:message key="productReview.rate.4"/>"/>
								     <input class="hover-star" type="radio" name="rate" value="5" title="<fmt:message key="productReview.rate.5"/>"/>
								     <span id="hover-info" style="margin:0 0 0 20px;">&nbsp;</span>
								     <input type="hidden" name="score" id="score"/>
							     </div>
							</td>
					</tr>
					<c:if test="${appConfig.customerReviewRight==0 and empty currUser}">
    				<%--如果允许匿名用户发表评论且当前未登录 --%>
						<tr>
								<th><fmt:message key="productReviewForm.customerName"/>：</th>
								<td><input id="customerName" name="customerName" type="text" class="inputtxt2" style="width:290px" /></td>
						</tr>
    				</c:if>
					<tr>
							<th><fmt:message key="productReviewForm.subject"/>：</th>
							<td><input id="subject" name="subject" type="text" class="inputtxt2" style="width:290px" /></td>
					</tr>
					<tr>
							<th><fmt:message key="productReviewForm.message"/>：</th>
							<td>
								<textarea  id="message" name="message"  cols="" rows="5" class="textareatxt2" style="width:390px">&nbsp;</textarea>
								<div class="space10"></div>
							</td>
					</tr>
					<tr>
							<th>&nbsp;</th>
							<td>
								<%--start:hidden --%>
								<input type="hidden" name="doAction" value="addReview"/>
								<input type="hidden" name="productId" value="${product.productId}"/>
								<%--end:  hidden --%>
								<input type="submit" id="addReviewSubmit" class="submit" value="" />
							</td>
					</tr>
					<tr>
						<td colspan="2">
							<p><fmt:message key="product.review.tips1"/></p>
							<p>	<fmt:message key="product.review.tips2"/></p>
							<p>	<c:choose>
									<c:when test="${appConfig.customerReviewRight == 2}">
										<fmt:message key="product.review.tips3"/>
									</c:when>
									<c:when test="${appConfig.customerReviewRight == 1}">
										<fmt:message key="product.review.tips31"/>
									</c:when>
									<c:otherwise>
										<fmt:message key="product.review.tips"/>
									</c:otherwise>
								</c:choose></p>
							<p>	<fmt:message key="product.review.tips4"/></p>
						
						</td>
					</tr>
			</table>
		</div>
	</div>
</form>	


